package ie.dcu.spca.model.sql;

public class userSQL {
    public static String selectUserByName = "SELECT * FROM user WHERE name='%s';";

    public static String selectById = "SELECT * FROM user WHERE id=%d;";

    public static String insertByName = "INSERT INTO user VALUES(?,?,?,?,?);";

    public static String insertByBean = "INSERT INTO user VALUES(?,?,?,?,?);";

    public static String deleteById = "UPDATE user SET delete_at=? WHERE id=?;";

    public static String deleteByBean = "";

    public static String updateByBean = "UPDATE user Set name=?,create_at=?,update_at=?,delete_at=? WHERE id=?";

    public static String selectMaxId = "SELECT MAX(id) as max FROM user;";

    public static String existById = "SELECT * FROM user WHERE id=%d";

    public static String isDeletedById = "SELECT * FROM user WHERE id=%d AND delete_at==0;";

    public static String selectAllBean = "SELECT * FROM user WHERE delete_at==0;";
}
